package org.code.mallspringboot.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.code.mallspringboot.pojo.UmsMember;

@Mapper
public interface MemberMapper {
    /**
        根据 username 查询
     * @param username
     * @return
     */
    @Select("SELECT * FROM `ums_member` WHERE username = #{username}")
    UmsMember loadUserByUsername(@Param("username") String username);

    @Select("SELECT id from ums_member WHERE username = #{username}")
    int member_id(String username);
}
